import { HttpModule } from '@nestjs/axios';
import { Module } from '@nestjs/common';
import { AxiosService } from './axios.service';
import { ConfigModule, ConfigService } from '@nestjs/config';

@Module({
  imports: [
    HttpModule.registerAsync({
      imports: [ConfigModule],
      useFactory: () => ({
        // 可以引入Config配置
      }),
      inject: [ConfigService],
    }),
  ],
  providers: [AxiosService],
  exports: [AxiosService],
})
export class AxiosModule {}
